import os
import unittest

import ddt


@ddt.ddt
class TestCase(unittest.TestCase):

    def test01(self):
        basepath='/Volumes/Mac/Code/pycharm/MyAI/temp/merchant/product/convert'
        fs=os.listdir(basepath)
        with open('alldata.json', 'w+') as wfp:
            for f in fs:
                with open(os.path.join(basepath,f)) as fp:
                    wfp.write(fp.read())
                    wfp.write('\n')

